// vim: se ft=javascript:
{
    "layer": "top",
    "position": "left",
    "mod": "dock",
    "exclusive": true,
    "gtk-layer-shell": true,
    "margin-bottom": -1,
    "passthrough": false,
    "height": 1440,
    "width": 84,
    "modules-left": [
        "custom/jgmenu",
        "custom/os_button",
    ],
    "modules-center": [
        //"hyprland/workspaces",
        "wlr/taskbar"
    ],
    "modules-right": [
        "custom/menu",
        "cpu",
        "temperature",
        "memory",
        "disk",
        "tray",
        "pulseaudio",
        "network",
        "battery",
        //"hyprland/language",
        "clock",
        "custom/showDesktop"
    ],
    //"hyprland/language": {
    //    "format": "{}",
    //    "format-en": "ENG",
    //    "format-ru": "РУС"
    //},
    //"hyprland/workspaces": {
    //    "icon-size": 32,
    //    "spacing": 16,
    //    "on-scroll-up": "hyprctl dispatch workspace r+1",
    //    "on-scroll-down": "hyprctl dispatch workspace r-1"
    //},
        "custom/jgmenu":{
            "format": "⚛",
            "on-click": "jgmenu_run ",
            "tooltip": false
        },
    "custom/os_button": {
        "format": "❖",
        "on-click": "wofi --show drun",
        "tooltip": false
    },
          "custom/menu": {
    "format": "☈ ",  // 空内容，不显示任何文本
    "tooltip": false,
    "on-click": "jgmenu  --at-pointer",
    "on-click-right": "exec ~/.config/waybar/right-click-menu.sh",
    "interval": "once"  // 无需重复执行
  },
    "cpu": {
        "interval": 5,
        "format": "  {usage}%",
        "on-click": "xterm -e 'btop'",
        "max-length": 10
    },
    "temperature": {
        // "thermal-zone": 2,
        "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
        "critical-threshold": 80,
        // "format-critical": "{temperatureC} ℃ {icon}",
        "format": "{icon}  {temperatureC}℃",
        "on-click": "xterm  -e 'htop'",
        "format-icons": ["", "", ""]
    },
    "disk": {
        "interval": 30,
        "format": "⛁  {percentage_used}%",
        "path": "/",
        "tooltip": true,
        "unit": "GB",
        "tooltip-format":  "Available {free} of {total}"
    },
    "memory": {
        "interval": 10,
        "format": "  {percentage}%",
        "max-length": 10,
        "tooltip": true,
        "tooltip-format": "RAM - {used:0.1f}GiB used"
    },
    "wlr/taskbar": {
        "format": "{icon}",
        "icon-size": 28,
        "spacing": 3,
        "on-click": "minimize-raise",
        "on-click-middle": "close",
        "tooltip-format": "{title}",
        "ignore-list": []
    },
    "tray": {
        "icon-size": 22,
    },
    "clock": {
        "format": "{:L%A %H:%M\n %Y-%m-%d}",
        "tooltip-format": "<tt><small>{calendar}</small></tt>",
        "calendar": {
            "mode": "year",
            "mode-mon-col": 3,
            "weeks-pos": "right",
            "on-scroll": 1,
            "on-click-right": "mode",
            "format": {
                "months": "<span color='#ffead3'><b>{}</b></span>",
                "days": "<span color='#ecc6d9'><b>{}</b></span>",
                "weeks": "<span color='#99ffdd'><b>W{}</b></span>",
                "weekdays": "<span color='#ffcc66'><b>{}</b></span>",
                "today": "<span color='#ff6699'><b><u>{}</u></b></span>"
            }
        },
        "actions": {
            "on-click-right": "mode",
            "on-click-forward": "tz_up",
            "on-click-backward": "tz_down",
            "on-scroll-up": "shift_up",
            "on-scroll-down": "shift_down"
        }
    },
    "network": {
        "format-ethernet": "🖧 ",
        "format-wifi": "",
        "format-disconnected": "⚠",
        "tooltip-format": "{ipaddr}",
        "tooltip-format-wifi": "{essid} ({signalStrength}%)  | {ipaddr}",
        "tooltip-format-ethernet": "{ifname} 🖧 | {ipaddr}",
        "on-click": "xterm -hold -e 'ip a'",
        "format-icons": [
            "󰤯 ",
            "󰤟 ",
            "󰤢 ",
            "󰤢 ",
            "󰤨 "
        ]
    },
    "battery": {
        "states": {
            "good": 95,
            "warning": 30,
            "critical": 20
        },
        "format": "{icon} {capacity}%",
        "format-charging": " {capacity}%",
        "format-plugged": " {capacity}%",
        "format-alt": "{time} {icon}",
        "format-icons": [
            "󰂎",
            "󰁺",
            "󰁻",
            "󰁼",
            "󰁽",
            "󰁾",
            "󰁿",
            "󰂀",
            "󰂁",
            "󰂂",
            "󰁹"
        ]
    },
    "pulseaudio": {
        "max-volume": 150,
        "scroll-step": 5,
        "format": "{icon} {volume}%",
        "tooltip-format": "{volume}%",
        "format-muted": "🔇 ",
        "format-icons": {
            "default": [
                " ",
                " ",
                " "
            ]
        },
        "on-click": "pamixer --toggle-mute",
        "on-click-right": "pavucontrol"
    },
        "custom/showDesktop": {
        "format": "◱",
        "on-click": "sh ~/.config/labwc/script/showDeskTop.sh",
        "tooltip-format": "显示桌面"
        }
}
